﻿@model SvgApplication.Web.Models.BlockUserModel

@{
    ViewBag.Title = "BlockUser";
}

<h2>BlockUser</h2>
@using (Html.BeginForm())
{
    
    @Html.ValidationSummary(true)

    @Html.HiddenFor(model => model.UserId)
  

    if (Model.BlockedState)
    {
    <label>Unblock User: </label>
    @Html.DisplayFor(model => model.Username)
    <label>?</label>
       // Model.Reason = "unblocked";
    }
    else
    {
    <label>Block User: </label>
    @Html.DisplayFor(model => model.Username)
    <label>?</label>
    
    <fieldset>
        <legend>Block User</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Reason)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Reason)
            @Html.ValidationMessageFor(model => model.Reason)
        </div>


    </fieldset>
    
    }
    <p>
        <input type="submit" value="Submit" />
    </p>
}
<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
